Skip to content

feat(git): 在授权工作区手动查看 Git / inspect Git history and tracked changes in approved workspaces - #10

Draft
Facetomyself wants to merge 6 commits into
feat/web-workbench-deliveriesfrom
feat/web-workbench-git-view
Draft

Facetomyself wants to merge 6 commits into
feat/web-workbench-deliveriesfrom
feat/web-workbench-git-view

Conversation

@Facetomyself

@Facetomyself Facetomyself commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #9. Refs sqfcyily#67. Adds a read-only, human-operated Git panel; mounting files alone does not grant Git history access. The operator names the allowed direct project directories separately.

  • Reuses the desktop branch button inside the actual workbench workspace dialog. Selecting a project or chatting does not trigger a Git read. Explicit controls show tracked changes, local and locally cached remote branches, bounded first-parent history, and staged versus working-tree text differences with line numbers.
  • The Linux service reads fixed, pinned metadata and content from the authorized project. The production runtime does not invoke Git, shell commands, repository config, hooks, external filters, upstream remotes or model services. Ordinary SHA-1 loose and verified pack/index objects, including bounded OFS/REF deltas, are supported. Private paths, special files, external gitdirs and alternate object stores are excluded.
  • Authenticated same-origin reads require CSRF, exact fields and short-lived view/entry IDs tied to the login and project. A replaced project, changed snapshot, expired view or revoked login cannot silently select another diff. Output and worker resource ceilings are enforced.
  • This is not write or remote Git parity. Untracked files, rename detection, filters, complete merge ancestry/upstream facts and special repository layouts remain explicitly limited; no stage/discard/commit/checkout/push/pull buttons are represented as working.
  • Unit and HTTP tests plus a real-browser CI step use synthetic local repos packed by a test-only system Git. They distinguish both diff baselines and check that the fixture index/refs/worktree bytes are unchanged. Browser and native amd64 receipts to follow.

Checked Git View evidence

  • Real Chrome and Node 22, ad9763e: 94/94 workbench checks and 305/305 server checks. The Git View browser step passed: it clicked the actual controls, inspected packed commits/branches and both numbered diffs, verified grant/refresh/CSRF boundaries, and compared Git metadata and working files before/after. A synthetic directory read uses POST; the test harness now counts that read separately from explicit Git operations rather than claiming the directory listing was a write. The inherited optional feat(browser): 隔离人工网页接管与工作台身份 / isolate manual browser handoff from workbench credentials #7 browser-worker check remains a distinct failing gate; the job is not all-green.
  • Native linux/amd64 at 7e14d47 (the only change to the CI-tested revision was an E2E file): main image 233,633,042 bytes, no system Git in the product container. Read-only fixture access and hashing confirmed real gc-packed data, two committed OIDs, staged/working baselines and line numbers, stale/cross-login rejection, unchanged underlying files, and renewed views after recreation. System Git was used only to build the synthetic test repository.

Native cleanup follow-up: the two functional test phases finished and no test service or host listener is active. The older target Docker engine returned overlay2 device or resource busy, leaving one non-running builder intermediate, one non-running workbench container and its two synthetic test volumes. This is a partial cleanup, not a functional Git failure or a permanent service. No daemon restart, forced unmount or global cleanup was performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant